














<!DOCTYPE html>
<!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
<!--[if IE 9]><html class="ie9" lang="en"><![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- start: HEAD -->
<head>
<title>子项目页面</title>
<!-- start: META -->
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv='X-UA-Compatible' content="IE=edge,IE=9,IE=8,chrome=1" /><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="" name="description" />
<meta content="" name="author" />
<meta name="renderer" content="webkit"/>
<!-- end: META -->
<link rel="shortcut icon" type="image/x-icon" href="/pros/resources/images/favicon.ico"/>
<link rel="stylesheet" href="/pros/resources/css/fonts-useso/fonts.css">

<!-- bootstrap 及 bootstrap拓展 -->
<link rel="stylesheet" href="/pros/resources/plugins/bootstrap-3.3.5-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/pros/resources/plugins/bootstrap-3.3.5-dist/css/bootstrap-expand.css">
<!-- end: 主要css -->
<!-- start: 插件 css -->

<!-- bootstrap 摸态框 -->
<link rel="stylesheet" href="/pros/resources/plugins/bootstrap-modal/css/bootstrap-modal.css">
<link rel="stylesheet" href="/pros/resources/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css">
<!-- 单选/多选 插件 -->

<!-- iCheck 多选/单选插件  -->
<link rel="stylesheet" href="/pros/resources/plugins/iCheck/skins/all.css">
<!-- 滚动条 -->

<!-- perfect-scrollbar 自定义滚动条  -->
<link rel="stylesheet" href="/pros/resources/plugins/perfect-scrollbar/src/perfect-scrollbar.css">
<!-- font-awesome -->

<!-- Font Awesome 图标字体  -->
<link rel="stylesheet" href="/pros/resources/plugins/font-awesome/css/font-awesome.min.css">
<!-- css3动画 -->

<!-- animate css3动画  -->
<link rel="stylesheet" href="/pros/resources/plugins/animate.css/animate.min.css">
<!-- select2插件 -->

<!-- animate css3动画  -->
<link rel="stylesheet" href="/pros/resources/plugins/select2-master/dist/css/select2.min.css">
<link rel="stylesheet" href="/pros/resources/plugins/select2-bootstrap/dist/select2-bootstrap.css">
<!-- 富文本编辑器 -->

<!-- 富文本编辑器 -->
<link rel="stylesheet" href="/pros/resources/plugins/summernote/dist/summernote.css">
<!-- 图片裁剪 -->

<!-- cropper 图片剪切 -->
<link rel="stylesheet" href="/pros/resources/plugins/cropper-master/dist/cropper.css">
<!-- 文件上传 -->

<!-- cropper 文件上传 -->
<!--[if lt IE 10]>
<link rel="stylesheet" href="/pros/resources/plugins/uploadify/uploadify.css" />
<![endif]-->
<!--[if gte IE 10]><!-->
<link rel="stylesheet" href="/pros/resources/plugins/uploadifive/uploadifive.css" />
<!--<![endif]-->
<!-- 表单验证 -->

<!-- 表单验证 -->
<link rel="stylesheet" href="/pros/resources/plugins/jQuery-Validation-Engine-master/css/validationEngine.jquery.css">
<!-- 日期插件 -->

<!-- 日期插件 -->
<link rel="stylesheet" href="/pros/resources/plugins/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">
<!-- ztree 树 -->

<!-- ztree -->
<link rel="stylesheet" href="/pros/resources/plugins/zTree_v3/css/zTreeStyle/zTreeStyle.css">
<!-- 弹出框 -->

<!-- sweetalert 弹出框  -->
<link rel="stylesheet" href="/pros/resources/plugins/sweetalert-0.5.x/lib/sweet-alert.css">
<!-- 图片预览 -->

<!-- 图片预览  -->
<link rel="stylesheet" href="/pros/resources/plugins/viewer-master/dist/viewer.css">
<!-- end: 插件 css -->



<!-- start: 框架 css -->
<link rel="stylesheet" href="/pros/resources/css/styles.css">
<link rel="stylesheet" href="/pros/resources/css/styles-responsive.css">
<link rel="stylesheet" href="/pros/resources/css/plugins.css">
<link rel="stylesheet" href="/pros/resources/css/themes/theme-default.css" type="text/css" id="skin_color">
<link rel="stylesheet" href="/pros/resources/css/print.css" type="text/css" media="print"/>
<link rel="stylesheet" href="/pros/resources/css/quick-layout.css">
<!-- end: 框架 css -->
<!--[if lt IE 9]>
<script src="/pros/resources/plugins/respond.min.js"></script>
<script src="/pros/resources/plugins/excanvas.min.js"></script>
<script src="/pros/resources/plugins/jQuery/jquery-1.11.1.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="/pros/resources/plugins/jQuery/jquery-2.1.1.min.js"></script>
<!--<![endif]-->
<script>
    var basePath = '/pros';
    var tabModel = true;
    var nodePath = 'https://www.scxszz.cn:443/pros_sczz';
</script>
</head>

<!-- end: HEAD -->
<!-- start: BODY -->
<body class="single-page">

<div class="tabModel-content animated hide">
        
    <!-- start: PAGE CONTENT -->
    <div id="page-content" class="row">
        <div class="col-md-12">
            <div class="panel panel-white pt10">
                <div class="panel-body">
                    <form method="post" class="form-horizontal">
                        <input type="hidden" id="orderType" name="orderType" value="">
                        <input type="hidden" id="orderField" name="orderField" value="">
<div class="row">
    <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="年度" class="col-sm-4 control-label ell nopadding" for="null">年度：</label><div class="col-sm-7">

        <select id="sqnd" name="sqnd" class=" form-control  select2-auto"
                data-table-name="USR_SC_ZZ.t_gx_lzjxj_zxsq"
                data-field-id="sqnd" data-field-name="sqnd" data-order-field="sqnd" data-order-type="desc"
                data-value="2018">2018</select>
    
</div></div></div>



        <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="审核状态" class="col-sm-4 control-label ell nopadding" for="null">审核状态：</label><div class="col-sm-7">

            <select id="shzt" name="shzt" class="form-control select2-auto">
                <option value="">全部</option>
                <option value="12" >待辅导员审核</option>
                <option value="13" >辅导员审核通过</option>
                <option value="-13" >辅导员审核退回</option>
                <option value="14" >待院系审核</option>
                <option value="15" >院系审核通过</option>
                <option value="-15" >院系审核退回</option>
                <option value="5" >待高校审核</option>
                <option value="6" >高校审核通过</option>
                <option value="-6" >高校审核退回</option>
                <option value="9" >待省中心审核</option>
                <option value="10" >省中心审核通过</option>
                <option value="-10" >省中心审核退回</option>
                <option value="-1" >不通过</option>
            </select>
        
</div></div></div>
        <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="身份证号" class="col-sm-4 control-label ell nopadding" for="null">身份证号：</label><div class="col-sm-7">

            <input type="text" id="sfzhm" name="sfzhm" class="form-control"/>
        
</div></div></div>
        <div class="yc">
            <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="姓名" class="col-sm-4 control-label ell nopadding" for="null">姓名：</label><div class="col-sm-7">

                <input type="text" id="xsxm" name="xsxm" class="form-control"/>
            
</div></div></div>
            
            <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="班级" class="col-sm-4 control-label ell nopadding" for="null">班级：</label><div class="col-sm-7">

                <input type="text" id="bjmc" name="bjmc" class="form-control"/>
            
</div></div></div>
            <div class="col-xxxl-3 col-md-4 col-sm-6 col-xs-12 "><div class="form-group"><label title="专业名称" class="col-sm-4 control-label ell nopadding" for="null">专业名称：</label><div class="col-sm-7">

               	<input type="text" id="zymc" name="zymc" class="form-control"/>
           	
</div></div></div>
            
            
        </div>



    <div class="col-sm-12 searchbtn-group" align="right">
        <button data-toggle="dropdown" class="btn btn-sm btn-info" onclick="pages.sreach(this)">查询<i
                class="fa fa-search"></i></button>
        <button data-toggle="dropdown" class="btn btn-sm btn-info btn-reset " onclick="tool.resetForm(this)">重置<i
                class="fa fa-mail-reply-all"></i></button>
        <button data-toggle="dropdown" class="btn btn-sm btn-info btn-reset butyc" onclick="pages.cx()">隐藏<i
                class="fa fa-minus-square"></i></button>
        <button data-toggle="dropdown" class="btn btn-sm btn-info btn-reset butzk" onclick="pages.cx()">展开<i
                class="fa fa-plus-square"></i></button>
    </div>
</div>
<hr class="dividing-line mb10"/>
<div class="row" id="czBtn">
    <div class="col-md-12">
        
        

        
            
            
                <a class="btn btn-sm btn-green" data-startFrom="top" onclick="pages.sp(this,1)">审核通过<i
                        class="fa fa-check fa-lg"></i></a>
            
            
            
            <a class="btn btn-sm btn-green" onclick="pages.sp(this,'2')">审核退回<i class="fa fa-mail-reply fa-lg"></i></a>
            
                <a class="btn btn-sm btn-green" onclick="pages.sp(this,'3')">上报<i
                        class="fa fa-cloud-upload fa-lg"></i></a>
            
            <a class="btn btn-sm btn-green" data-startFrom="top" onclick="pages.sp(this,-2)">不通过<i class="fa "></i></a>
            
	                <a class="btn btn-sm btn-green" onclick="pages.delYz(this)">删除 <i class="fa fa-times"></i></a>
            
        
        

        
        
        <a class="btn btn-sm btn-green" data-startFrom="top" onclick="pages.print(this);">打印<i class="fa "></i></a>
        
            <a class="btn btn-green btn-sm" data-startFrom="top" onclick="pages.exportData('exportGxLzjxj.jsp',this)">导出
                <i class="fa fa-sign-out"></i></a>
            <a class="btn btn-green btn-sm" data-startFrom="top"
               onclick="pages.exportData('exportGxLzjxj_qg.jsp',this)">导出全国系统模版<i class="fa fa-sign-out"></i></a>
        
        
    	  <a class="btn btn-green btn-sm" data-startFrom="top"
               onclick="printAward(this,'1')">生成（打印）获奖证书<i class="fa fa-sign-out"></i></a>
          <from>
          <a class="btn btn-green btn-sm" data-startFrom="top"
               onclick="xiazai('1')">下载证书图片<i class="fa fa-sign-out"></i></a>
          <from>    
<!--     	   	                -->
        
    	
        <div class="btn-group pull-right">
            <button data-toggle="dropdown" class="btn btn-sm btn-green dropdown-toggle page-size">
    20 <i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu dropdown-light pull-right">
    <li><a data-page-size="20">20</a></li>
    <li><a data-page-size="50">50</a></li>
    <li><a data-page-size="80">80</a></li>
    <li><a data-page-size="100">100</a></li>
</ul>
        </div>
    </div>
</div>
<div class="dataTables_wrapper form-inline">
    <table class="table table-striped table-hover dataTable table-bordered table-align-center">
        <thead>
        <tr>
            <th class="center w20">
                <div class="checkbox-table">
                    <label>
                        <input type="checkbox" class="grey selectall"><input type="hidden" id="ndFlag" value='2018'>
                    </label>
                </div>
            </th>
            <th>申请年度</th>
            <th>姓名</th>
            <th>身份证号码</th>
            <th>学校</th>
            <th>院系</th>
            <th>辅导员</th>
            <th>班级</th>
            <th>专业</th>
            <th>学生证号</th>
            <th>入学时间</th>
            <th>审核状态</th>
            <th>操作记录</th>
        </tr>
        </thead>
        <tbody>
        
        </tbody>
    </table>
</div>

	<script type="text/javascript" src="https://www.scxszz.cn/Report/ReportServer?op=emb&resource=finereport.js"></script>

<script type="text/javascript" src="/pros/resources/plugins/blockUI/jquery.blockUI.js"></script>

<script>
function xiazai(lx){
 var sqnd =$("#sqnd").val();
 window.location=tool.initParams('https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/xz?lx='+lx+"&sqnd="+sqnd);
 
}

	function getWorkDayCount(beginDay, endDay) {
        var Holiday = ["2018-10-01", "2018-10-02", "2018-10-03", "2018-10-04", "2018-10-05",beginDay, endDay];
        var WeekendsOff = ["2018-09-29","2018-09-30"];
	    /*
	     　　功能：计算一段时间内工作的天数。不包括周末和法定节假日，法定调休日为工作日，周末为周六、周日两天；
	     　　参数：
	     　　mode -推算模式（'cn'表示国人习惯；'en'表示国际习惯）
	     　　beginDay -时间段开始日期；
	     　　endDay -时间段结束日期；
	     　　*/
	    var mode = "cn";
	    var begin = new Date(beginDay);
	    var end = new Date(endDay);
	    //每天的毫秒总数，用于以下换算
	    var daytime = 24 * 60 * 60 * 1000;
	    //两个时间段相隔的总天数
	    var days = (end - begin) / daytime + 1;
	    //时间段起始时间所在周的第一天
	    var beginWeekFirstDay = nearlyWeeks(mode, 0, begin.getTime()).getTime();
	    //时间段结束时间所在周的最后天
	    var endWeekOverDay = nearlyWeeks(mode, 0, end.getTime()).getTime() + 6 * daytime;
	    //由beginWeekFirstDay和endWeekOverDay换算出，周末的天数
	    var weekEndCount = ((endWeekOverDay - beginWeekFirstDay) / daytime + 1) / 7 * 2;
	    //根据参数mode，调整周末天数的值
	    if (mode == "cn") {
	        if (end.getDay() > 0 && end.getDay() < 6)
	            weekEndCount -= 2;
	        else if (end.getDay() == 6)
	            weekEndCount -= 1;
	        if (begin.getDay() == 0) weekEndCount -= 1;
	    }
	    else {
	        if (end.getDay() < 6) weekEndCount -= 1;
	        if (begin.getDay() > 0) weekEndCount -= 1;
	    }
	    //根据调休设置，调整周末天数（排除调休日）
	    for (var i = 0; i < WeekendsOff.length; i++) {
	        var itemDay = new Date(WeekendsOff[i].split('-')[0] + "/" + WeekendsOff[i].split('-')[1] + "/" + WeekendsOff[i].split('-')[2]);
	        //如果调休日在时间段区间内，且为周末时间（周六或周日），周末天数值-1
	        if (itemDay.getTime() >= begin.getTime() && itemDay.getTime() <= end.getTime() && (itemDay.getDay() == 0 || itemDay.getDay() == 6))
	            weekEndCount -= 1;
	    }
	    //根据法定假日设置，计算时间段内周末的天数（包含法定假日）
	    for (var j = 0; j < Holiday.length; j++) {
	        var itemDay = new Date(Holiday[j].split('-')[0] + "/" + Holiday[j].split('-')[1] + "/" + Holiday[j].split('-')[2]);
	        var begin2 = new Date(beginDay.split('-')[0] + "/" + beginDay.split('-')[1] + "/" + beginDay.split('-')[2]);
	        var end2 = new Date(endDay.split('-')[0] + "/" + endDay.split('-')[1] + "/" + endDay.split('-')[2])
	        //如果法定假日在时间段区间内，且为工作日时间（周一至周五），周末天数值+1
	        if (itemDay.getTime() >= begin2.getTime() && itemDay.getTime() <= end.getTime() && itemDay.getDay() > 0 && itemDay.getDay() < 6) {
	            weekEndCount++;
	        }
	
	    }
	    //工作日 = 总天数 - 周末天数（包含法定假日并排除调休日）
	    return days - weekEndCount;
	}
	
	function nearlyWeeks(mode, weekcount, end) {
	    /*
	     　　功能：计算当前时间（或指定时间），向前推算周数(weekcount)，得到结果周的第一天的时期值；
	     　　参数：
	     　　mode -推算模式（'cn'表示国人习惯；'en'表示国际习惯）
	     　　weekcount -表示周数（0-表示本周， 1-前一周，2-前两周，以此推算）；
	     　　end -指定时间的字符串（未指定则取当前时间）；
	     　　*/
	    if (mode == undefined) mode = "cn";
	    if (weekcount == undefined) weekcount = 0;
	    if (end != undefined)
	        end = new Date(new Date(end));
	    else
	        end = new Date(new Date());
	    var days = 0;
	    if (mode == "cn") {
	        if (end.getDay() == 0) {
	            days = 7 - 1;
	        } else {
	            days = end.getDay() - 1;
	        }
	    } else {
	        days = end.getDay();
	    }
	    return new Date(end.getTime() - (days + weekcount * 7) * 24 * 60 * 60 * 1000);
	}
	
	function isDateTime() {
	    var val = $('#xxshrq').val();
	    var date = new Date();//获取系统当前时间
	    var month = date.getMonth() + 1;//获取系统当前的月份（0-11），则月份 +1
	    var day = date.getDate();
	    if (month < 10) {//为保证月份为两位数能进行时间比较
	        month = "0" + month;
	    }
	    if (day < 10) {
	        day = "0" + day;
	    }
	   	var year = new Date().getFullYear();
	    date = year + "-" + month + "-" + day;
	    if (val !=null && val !="") {
	   		val = year+val.substring(4);
	   		$('#xxshrq').val(val);
	    }
	    checkdate();
	}
	
	function checkdate() {
	    var yxshrq = $('#yxshrq').val();
	    var xxshrq = $('#xxshrq').val();
	    if (yxshrq != '' && xxshrq != null) {
	        if (getWorkDayCount(yxshrq, xxshrq) < 4) {
	            tool.alertWarning("学校审核日期必须晚于院系审核日期至少5个工作日！");
	            $('#xxshrq').val("");
	            return false;
	        }
	    }
	    return true;
	}
	
    var pages = {
   		text:$("#czBtn").html(),
        //type 1：审核通过、type 2：审核退回、type 3：上报、type 4：审核通过并上报、-2不通过
        sp: function (el, type) {
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var length = ids.split(",").length;
            var parameter = null;
            if (ids != '') {
                parameter = 'wid';
            }
            var yj = null;
            if (true) {
                //yj="{\"tjly\":\"\",\"tjrq\":\"\"}";
            } else if (false) {
                //yj="{\"yxyj\":\"\",\"yxshrq\":\"\"}";
            } else if (false) {
                //yj="{\"xxyj\":\"\",\"xxshrq\":\"\"}";
            }
            if (type == '1') {//审核通过
                if (length == '1' && ids != '') {
                    var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/shtg';
                    $.post(tool.initParams(url), {'wid': ids}, function (data) {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能进行审核通过操作！");
                        } else if (data.oper_msg == 'yes') {
                            tool.editData(el);
                        }
                    });
                } else {
                    tool.alertWarning("请选择要审核的数据!", "请勾选一条要审核的数据");
                }
            } else if (type == '3') {//上报
                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, null, null);
            } else if (type == '2') {//审核退回
                tool.report_open(el, 't_gx_lzjxj_zxsq', type, parameter, null, yj, true);
            } else if (type == '-2') {//不通过
                tool.report_open(el, 't_gx_lzjxj_zxsq', type, parameter, null, yj, true);
            }
        },

        //高校和省中心的审核通过流程
        sp1: function (el, type) {
            var lx = 24;
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var length = ids.split(",").length;
            var parameter = null;
            if (ids != '') {
                parameter = 'wid';
            }
            if (lx == '22') {
                var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/yxMaxDate';
                $.post(tool.initParams(url), {"dwbm": ids, "type": 'wid'}, function (data) {
                    //var date = getworkday(data.oper_msg, 5);
                    //tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + date + "\"}", null);
                    pages.gxsh(el, type, parameter,data.oper_msg );
                });
            } else if (lx == '01') {
                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, null, null);
            }
        },
        
        gxsh: function (el, type, parameter, yxshrq) {
            bootbox.dialog({
                title: "高校审核",
                message: '<div class="row">  ' +
                '<div class="col-md-20"> ' +
                '<form class="form-horizontal" id="form-horizontal"> ' +
	                '<div class="form-group"> ' +
	                	'<label class="col-md-2 control-label">院系审核日期:</label> ' +
		                '<div class="col-md-9"> ' +
		                '<input id ="yxshrq" type="text" class=" form-control dis " value="'+yxshrq+'" readonly="readonly" > ' +
		                '</div> ' +
	                '</div> ' +
	                '<div class="form-group"> ' +
	                	'<label class="col-md-2 control-label" >高校审核日期:</label> ' +
		                '<div class="col-md-9">' +
		                ' <input id="xxshrq" name="xxshrq" type="text" class="validate[required] form-control" data-element-type="datetimepicker" data-format="YYYY-MM-DD" onblur="isDateTime()" > ' +
		                '</div>' +
	                '</div>' +
                '</form></div>',
                buttons: {
                    close: {
                        label: "暂不审核",
                        className: "btn-default btn-sm",
                        callback: function () {
                        }
                    },
                    success: {
                        label: "审核通过",
                        className: "btn-success",
                        callback: function () {
                            if ($('#xxshrq').parents('form').validationEngine('validate')) {
                                var yxshrq = $('#yxshrq').val();
                                var xxshrq = $('#xxshrq').val();
                                var con = null;
                                // "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家奖学金。' + "\",\"xxshrq\":\"" + date + "\"}"
                                //var json = "{\"xxrj\":\"" + sj + "\",\"" + shyj + "\":\"" + yj + "\",\"yxpsr\":\"" + yxpsr + "\"}";
                                var json = "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + xxshrq + "\"}"
                                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, con, json, null);
                              //tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + date + "\"}", null);
                            } else {
                                return false;
                            }
                        }
                    }
                }
            });
            $('#xxshrq').datetimepicker({
                format: 'YYYY-MM-DD'
            });
        }, 

        //学生新增操作前的验证
        addDataBack: function (el, con) {
            var url = 'https://www.scxszz.cn:443/pros_sczz//s/stu/gxLzjxjZxsq/addYz';
            $.post(tool.initParams(url), {'sqnd': con}, function (data) {
                if (data.oper_msg == 'wsq') {
                    tool.alertWarning("上一学年未通过贫困生审核，不能申请励志奖学金！");
                } else if (data.oper_msg == 'ysq') {
                    tool.alertWarning("该年度已申请过，不能重复申请！");
                } else if (data.oper_msg == 'ysqgj') {
                    tool.alertWarning("该年度已申请过国家奖学金，不能同时申请励志奖学金！");
                } else if (data.oper_msg == 'jbxx') {
                    tool.alertWarning("请先维护基本信息！");
                } else if (data.oper_msg == 'yhkh') {
                    tool.alertWarning("基本信息中填写的银行卡号位数必须在16-19位之间！");
                } else if (data.oper_msg == 'rxnf'){
                	tool.alertWarning("入学年份必须早于当前年份!");
                } else if (data.oper_msg == 'yes') {
                    tool.addData(el, con)
                }else if (data.oper_msg == 'fdybm') {
                    tool.alertWarning("当前学生辅导员一栏缺失，请联系院系或者高校维护辅导员！");
                } 
            });
        },

        //辅导员进行删除的验证
        delYz: function (el) {
            var ids = tool.getChoseData($('.form-horizontal'));
            if (ids == '') {
                tool.alertWarning("请勾选要操作的数据!");
                return;
            }
            var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/delYz';
            $.post(tool.initParams(url), {'wid': ids}, function (data) {
                if (data.oper_msg == 'no') {
                    tool.alertWarning("只有状态为待辅导员审核、辅导员审核通过、辅导员审核退回、院系审核退回、不通过的数据可以删除！");
                } else if (data.oper_msg == 'yes') {
                    tool.doRemove(el);
                }
            });
        },

        //学生删除或修改操作前的验证
        delOrUpd: function (el, type) {
            var slength = 0;
            var a = document.getElementsByName("selectNode");
            for (var i = 0; i < a.length; i++) {
                if (a[i].checked) {
                    slength += 1;
                }
            }
            if (slength == 1) {
                var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/stuValidation';
                $.post(tool.initParams(url), {'type': type}, function (data) {
                    if (type == 'del') {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能删除！");
                        } else {
                            tool.doRemove(el);
                        }
                    } else if (type == 'upd') {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能修改！");
                        } else {
                            tool.editData(el);
                        }
                    }
                });
            } else {
                tool.alertWarning("请选择一条要操作的数据!");
            }
        },
        print: function (el) {
            var ids = tool.getChoseData($('.form-horizontal'));
            if (ids == '') {
                tool.alertWarning("请勾选要打印的数据!");
                return;
            }
            var url = 'https://www.scxszz.cn/Report/ReportServer' + "?reportlet=/sc_gx_lzjxj_sqb.cpt";
            tool.openReport(el,url+"&wid="+ids+"&zcd="+"true"+"&__filename__=国家励志奖学金申请表","国家励志奖学金申请表");
        },
        exportData: function (param, el) {
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var elList = form_element.find('input[type="text"],input[type="hidden"],select');
            var temp = "";
            elList.each(function () {
                var $el = $(this);
                if (isNotBlank($el.val())) {
                    temp += $el.attr('name') + '=' + $el.val() + '&';
                }
            });
            if (elList.length > 0) {
                temp = temp.substr(0, temp.length - 1);
            }
            param = param + '?' + temp;
            var dwbm = '240002192';
            if (isNotBlank(dwbm)) {
                param += "&dwbm=" + dwbm;
            }
            if (ids == '' || ids == null) {
                tool.alertConfirm('确定要导出所有数据吗?', '', function () {
                    tool.exportData(param, 'https://www.scxszz.cn:443/pros_sczz/');
                })
            } else {
                param = param + "&wid=" + ids;
                tool.exportData(param, 'https://www.scxszz.cn:443/pros_sczz/');
            }
        }, cx: function () {
            $(".yc").toggle();
            $(".butyc").toggle();
            $(".butzk").toggle();
        },submitFormCallBack: function () {
        var nd = $("#sqnd").val();
        var nd1 = '2018';
        if (nd != nd1) {
            $("a[hide]").hide();
            $("button[hide]").hide();
        } else {
            $("a[hide]").show();
            $("button[hide]").show();
        }
    },sreach:function(el){
        tool.doSearch(el,null,pages.submitFormCallBack())
        	if($("#ndFlag").val()!=$("#sqnd").val()){
	        	$("[onClick*='pages.sp'],[onClick*='pages.del'],[onClick*='tool.importData'],[onClick*='tool.doR']").remove();
        	}else{
        		$("#czBtn").html(pages.text);
        	}
        }
    }

    $(function () {
        $(".yc").hide();
        $(".butyc").hide();
        if(false){
    		$("form").append("<a onclick ='tool.doSearch(this)'></a>");//追加一个查询事件，用于回调刷新
    	}
    });

    function isSubmitForm() {
        return true;
    }

    var holiday = ['2018-10-01', '2018-10-02', '2018-10-03', '2018-10-04', '2018-10-05', '2018-10-06', '2018-10-07'];
    var holidayMap = ['2018-09-24'];
    function getMap(hd) {
        for (var i = 0; i < hd.length; i++) {
            holidayMap[hd[i]] = '1';
        }
    }
    function formatTen(f) {
        if (parseInt(f, 10) < 10) {
            return '0' + f;
        }
        return f;
    }
    function formateDate(date) {
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        return year + "-" + formatTen(month) + "-" + formatTen(day);
    }
    function getworkday(dat, itervalByDay) {
        var str = dat.split("-");
        var date = new Date();
        date.setUTCFullYear(str[0], str[1] - 1, str[2]);
        date.setUTCHours(0, 0, 0, 0);
        var millisceonds = date.getTime();
        for (var i = 1; i <= itervalByDay; i++) {
            millisceonds += 24 * 60 * 60 * 1000;
            date.setTime(millisceonds);
            if (date.getDay() == 0 || date.getDay() == 6) {
                i--;
            } else { //过滤节假日
                var d = formateDate(date);
                if (holidayMap[d]) {
                    i--;
                }
            }
        }
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var rq = year + "-" + formatTen(month) + "-" + formatTen(day);
        return rq;
    }
    getMap(holiday);
    function printAward(el,lx){
    //alert(lx)
       var ids = tool.getChoseData($('.form-horizontal')); 
       if (ids == '' || ids == null) {
                tool.alertConfirm('确定要生成（打印）所有证书吗?', '', function () {
                   madeAward(el,lx,ids);
                });
    }else{
           madeAward(el,lx,ids);
      
    }
    }
    function madeAward(el,lx,ids){
      var sqnd=$("#sqnd").val();
      var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/make?lx='+lx+"&sqnd="+sqnd;
      var bburl = 'https://www.scxszz.cn/Report/ReportServer' ;
      var departtype='24';
     // alert(bburl);
      if(ids!=''&&ids!=null){
         url+='&wid='+ids;
      }
      $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在申请中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	    
			 if (data.oper_res) {
			 			if(ids==""){
			 			bburl  += "?reportlet=/sczz_dzzs.cpt";
			if (departtype=='24') {
			 			 tool.openReport(el,bburl+"&fdybm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            } else if (departtype=='23') {
            //alert(2)
			 			 tool.openReport(el,bburl+"&yxbm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            } else if (departtype=='22') {
            //alert(3);
                     tool.openReport(el,bburl+"&xxbm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
            else if (departtype=='01') {
           // alert(4)
                    tool.openReport(el,bburl+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
            else if (departtype=='100') {
                     tool.openReport(el,bburl+"&sfzhm="+'chengongsuo'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
			 			}
			 			if(!ids==""){
			 	bburl  += "?reportlet=/sczz_dzzs.cpt";
			    //alert(bburl+"&wid="+data.data.wid+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书");	
			 	tool.openReport(el,bburl+"&wid="+data.data.wid+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
			 			
			 			
			 			}
                   
                  } 
                  else {
                   tool.alertError('操作失败',data.oper_msg);
		   }
		},
    	})
    	tool.submitForm($(el).parents('.form-horizontal'));
     }
     
   function printZhang(el,type) {
	 var ids = tool.getChoseData($('.form-horizontal')); 
       if (ids == '' || ids == null) {
                tool.alertConfirm('确定要给所有证书盖章吗?', '', function () {
                   gaizhang(el,type,ids);
                });
    }else{
           gaizhang(el,type,ids);
      
    }
}
function gaizhang(el,type,ids) {
	 var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/gz?lx='+type+'&wid='+ids;
	  $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在盖章中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
			tool.submitForm($(el).parents('.form-horizontal'));
		},
    	})
}
function printBm(el,type) {
    var ids = tool.getChoseData($('.form-horizontal')); 
    
  	var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/bm?wid='+ids+'&type='+type;
  	if (ids == '' || ids == null) {
                tool.alertConfirm('确定要给所有数据生成编号吗?', '', function () {
                   $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在生成编号中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
			tool.submitForm($(el).parents('.form-horizontal'));
		},
    	})
                });
    }else{
          $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在生成编号中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
			tool.submitForm($(el).parents('.form-horizontal'));
		},
    	})
      
    }
	  
}  
</script>
<script>
	function getWorkDayCount(beginDay, endDay) {
        var Holiday = ["2018-10-01", "2018-10-02", "2018-10-03", "2018-10-04", "2018-10-05",beginDay, endDay];
        var WeekendsOff = ["2018-09-29","2018-09-30"];
	    /*
	     　　功能：计算一段时间内工作的天数。不包括周末和法定节假日，法定调休日为工作日，周末为周六、周日两天；
	     　　参数：
	     　　mode -推算模式（'cn'表示国人习惯；'en'表示国际习惯）
	     　　beginDay -时间段开始日期；
	     　　endDay -时间段结束日期；
	     　　*/
	    var mode = "cn";
	    var begin = new Date(beginDay);
	    var end = new Date(endDay);
	    //每天的毫秒总数，用于以下换算
	    var daytime = 24 * 60 * 60 * 1000;
	    //两个时间段相隔的总天数
	    var days = (end - begin) / daytime + 1;
	    //时间段起始时间所在周的第一天
	    var beginWeekFirstDay = nearlyWeeks(mode, 0, begin.getTime()).getTime();
	    //时间段结束时间所在周的最后天
	    var endWeekOverDay = nearlyWeeks(mode, 0, end.getTime()).getTime() + 6 * daytime;
	    //由beginWeekFirstDay和endWeekOverDay换算出，周末的天数
	    var weekEndCount = ((endWeekOverDay - beginWeekFirstDay) / daytime + 1) / 7 * 2;
	    //根据参数mode，调整周末天数的值
	    if (mode == "cn") {
	        if (end.getDay() > 0 && end.getDay() < 6)
	            weekEndCount -= 2;
	        else if (end.getDay() == 6)
	            weekEndCount -= 1;
	        if (begin.getDay() == 0) weekEndCount -= 1;
	    }
	    else {
	        if (end.getDay() < 6) weekEndCount -= 1;
	        if (begin.getDay() > 0) weekEndCount -= 1;
	    }
	    //根据调休设置，调整周末天数（排除调休日）
	    for (var i = 0; i < WeekendsOff.length; i++) {
	        var itemDay = new Date(WeekendsOff[i].split('-')[0] + "/" + WeekendsOff[i].split('-')[1] + "/" + WeekendsOff[i].split('-')[2]);
	        //如果调休日在时间段区间内，且为周末时间（周六或周日），周末天数值-1
	        if (itemDay.getTime() >= begin.getTime() && itemDay.getTime() <= end.getTime() && (itemDay.getDay() == 0 || itemDay.getDay() == 6))
	            weekEndCount -= 1;
	    }
	    //根据法定假日设置，计算时间段内周末的天数（包含法定假日）
	    for (var j = 0; j < Holiday.length; j++) {
	        var itemDay = new Date(Holiday[j].split('-')[0] + "/" + Holiday[j].split('-')[1] + "/" + Holiday[j].split('-')[2]);
	        var begin2 = new Date(beginDay.split('-')[0] + "/" + beginDay.split('-')[1] + "/" + beginDay.split('-')[2]);
	        var end2 = new Date(endDay.split('-')[0] + "/" + endDay.split('-')[1] + "/" + endDay.split('-')[2])
	        //如果法定假日在时间段区间内，且为工作日时间（周一至周五），周末天数值+1
	        if (itemDay.getTime() >= begin2.getTime() && itemDay.getTime() <= end.getTime() && itemDay.getDay() > 0 && itemDay.getDay() < 6) {
	            weekEndCount++;
	        }
	
	    }
	    //工作日 = 总天数 - 周末天数（包含法定假日并排除调休日）
	    return days - weekEndCount;
	}
	
	function nearlyWeeks(mode, weekcount, end) {
	    /*
	     　　功能：计算当前时间（或指定时间），向前推算周数(weekcount)，得到结果周的第一天的时期值；
	     　　参数：
	     　　mode -推算模式（'cn'表示国人习惯；'en'表示国际习惯）
	     　　weekcount -表示周数（0-表示本周， 1-前一周，2-前两周，以此推算）；
	     　　end -指定时间的字符串（未指定则取当前时间）；
	     　　*/
	    if (mode == undefined) mode = "cn";
	    if (weekcount == undefined) weekcount = 0;
	    if (end != undefined)
	        end = new Date(new Date(end));
	    else
	        end = new Date(new Date());
	    var days = 0;
	    if (mode == "cn") {
	        if (end.getDay() == 0) {
	            days = 7 - 1;
	        } else {
	            days = end.getDay() - 1;
	        }
	    } else {
	        days = end.getDay();
	    }
	    return new Date(end.getTime() - (days + weekcount * 7) * 24 * 60 * 60 * 1000);
	}
	
	function isDateTime() {
	    var val = $('#xxshrq').val();
	    var date = new Date();//获取系统当前时间
	    var month = date.getMonth() + 1;//获取系统当前的月份（0-11），则月份 +1
	    var day = date.getDate();
	    if (month < 10) {//为保证月份为两位数能进行时间比较
	        month = "0" + month;
	    }
	    if (day < 10) {
	        day = "0" + day;
	    }
	   	var year = new Date().getFullYear();
	    date = year + "-" + month + "-" + day;
	    if (val !=null && val !="") {
	   		val = year+val.substring(4);
	   		$('#xxshrq').val(val);
	    }
	    checkdate();
	}
	
	function checkdate() {
	    var yxshrq = $('#yxshrq').val();
	    var xxshrq = $('#xxshrq').val();
	    if (yxshrq != '' && xxshrq != null) {
	        if (getWorkDayCount(yxshrq, xxshrq) < 4) {
	            tool.alertWarning("学校审核日期必须晚于院系审核日期至少5个工作日！");
	            $('#xxshrq').val("");
	            return false;
	        }
	    }
	    return true;
	}

    var pages = {
    	text:$("#czBtn").html(),
        //type 1：审核通过、type 2：审核退回、type 3：上报、type 4：审核通过并上报、-2不通过
        sp: function (el, type) {
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var length = ids.split(",").length;
            var parameter = null;
            if (ids != '') {
                parameter = 'wid';
            }
            var yj = null;
            if (true) {
                //yj="{\"tjly\":\"\",\"tjrq\":\"\"}";
            } else if (false) {
                //yj="{\"yxyj\":\"\",\"yxshrq\":\"\"}";
            } else if (false) {
                //yj="{\"xxyj\":\"\",\"xxshrq\":\"\"}";
            }
            if (type == '1') {//审核通过
                if (length == '1' && ids != '') {
                    var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/shtg';
                    $.post(tool.initParams(url), {'wid': ids}, function (data) {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能进行审核通过操作！");
                        } else if (data.oper_msg == 'yes') {
                            tool.editData(el);
                        }
                    });
                } else {
                    tool.alertWarning("请选择要审核的数据!", "请勾选一条要审核的数据");
                }
            } else if (type == '3') {//上报
                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, null, null);
            } else if (type == '2') {//审核退回
                tool.report_open(el, 't_gx_lzjxj_zxsq', type, parameter, null, yj, true);
            } else if (type == '-2') {//不通过
                tool.report_open(el, 't_gx_lzjxj_zxsq', type, parameter, null, yj, true);
            }
        },

        //高校和省中心的审核通过流程
        sp1: function (el, type) {
            var lx = 24;
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var length = ids.split(",").length;
            var parameter = null;
            if (ids != '') {
                parameter = 'wid';
            }
            if (lx == '22') {
                var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/yxMaxDate';
                $.post(tool.initParams(url), {"dwbm": ids, "type": 'wid'}, function (data) {
                    //var date = getworkday(data.oper_msg, 5);
                    //tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + date + "\"}", null);
                    pages.gxsh(el, type, parameter,data.oper_msg );
                });
            } else if (lx == '01') {
                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, null, null);
            }
        },
        
        gxsh: function (el, type, parameter, yxshrq) {
            bootbox.dialog({
                title: "高校审核",
                message: '<div class="row">  ' +
                '<div class="col-md-20"> ' +
                '<form class="form-horizontal" id="form-horizontal"> ' +
	                '<div class="form-group"> ' +
	                	'<label class="col-md-2 control-label">院系审核日期:</label> ' +
		                '<div class="col-md-9"> ' +
		                '<input id ="yxshrq" type="text" class=" form-control dis " value="'+yxshrq+'" readonly="readonly" > ' +
		                '</div> ' +
	                '</div> ' +
	                '<div class="form-group"> ' +
	                	'<label class="col-md-2 control-label" >高校审核日期:</label> ' +
		                '<div class="col-md-9">' +
		                ' <input id="xxshrq" name="xxshrq" type="text" class="validate[required] form-control" data-element-type="datetimepicker" data-format="YYYY-MM-DD" onblur="isDateTime()" > ' +
		                '</div>' +
	                '</div>' +
                '</form></div>',
                buttons: {
                    close: {
                        label: "暂不审核",
                        className: "btn-default btn-sm",
                        callback: function () {
                        }
                    },
                    success: {
                        label: "审核通过",
                        className: "btn-success",
                        callback: function () {
                            if ($('#xxshrq').parents('form').validationEngine('validate')) {
                                var yxshrq = $('#yxshrq').val();
                                var xxshrq = $('#xxshrq').val();
                                var con = null;
                                // "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家奖学金。' + "\",\"xxshrq\":\"" + date + "\"}"
                                //var json = "{\"xxrj\":\"" + sj + "\",\"" + shyj + "\":\"" + yj + "\",\"yxpsr\":\"" + yxpsr + "\"}";
                                var json = "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + xxshrq + "\"}"
                                tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, con, json, null);
                              //tool.report_s(el, 't_gx_lzjxj_zxsq', type, parameter, null, "{\"xxyj\":\"" + '经评审，并在校内公示5个工作日，无异议，现报请同意该同学获得国家励志奖学金。' + "\",\"xxshrq\":\"" + date + "\"}", null);
                            } else {
                                return false;
                            }
                        }
                    }
                }
            });
            $('#xxshrq').datetimepicker({
                format: 'YYYY-MM-DD'
            });
        }, 

        //学生新增操作前的验证
        addDataBack: function (el, con) {
            var url = 'https://www.scxszz.cn:443/pros_sczz//s/stu/gxLzjxjZxsq/addYz';
            $.post(tool.initParams(url), {'sqnd': con}, function (data) {
                if (data.oper_msg == 'wsq') {
                    tool.alertWarning("上一学年未通过贫困生审核，不能申请励志奖学金！");
                } else if (data.oper_msg == 'ysq') {
                    tool.alertWarning("该年度已申请过，不能重复申请！");
                } else if (data.oper_msg == 'ysqgj') {
                    tool.alertWarning("该年度已申请过国家奖学金，不能同时申请励志奖学金！");
                } else if (data.oper_msg == 'jbxx') {
                    tool.alertWarning("请先维护基本信息！");
                } else if (data.oper_msg == 'yhkh') {
                    tool.alertWarning("基本信息中填写的银行卡号位数必须在16-19位之间！");
                } else if (data.oper_msg == 'rxnf'){
                	tool.alertWarning("入学年份必须早于当前年份!");
                } else if (data.oper_msg == 'yes') {
                    tool.addData(el, con)
                }else if (data.oper_msg == 'fdybm') {
                    tool.alertWarning("当前学生辅导员一栏缺失，请联系院系或者高校维护辅导员！");
                }
            });
        },

        //辅导员进行删除的验证
        delYz: function (el) {
            var ids = tool.getChoseData($('.form-horizontal'));
            if (ids == '') {
                tool.alertWarning("请勾选要操作的数据!");
                return;
            }
            var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/delYz';
            $.post(tool.initParams(url), {'wid': ids}, function (data) {
                if (data.oper_msg == 'no') {
                    tool.alertWarning("只有状态为待辅导员审核、辅导员审核通过、辅导员审核退回、院系审核退回、不通过的数据可以删除！");
                } else if (data.oper_msg == 'yes') {
                    tool.doRemove(el);
                }
            });
        },

        //学生删除或修改操作前的验证
        delOrUpd: function (el, type) {
            var slength = 0;
            var a = document.getElementsByName("selectNode");
            for (var i = 0; i < a.length; i++) {
                if (a[i].checked) {
                    slength += 1;
                }
            }
            if (slength == 1) {
                var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/gxLzjxjZxsq/stuValidation';
                $.post(tool.initParams(url), {'type': type}, function (data) {
                    if (type == 'del') {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能删除！");
                        } else {
                            tool.doRemove(el);
                        }
                    } else if (type == 'upd') {
                        if (data.oper_msg == 'no') {
                            tool.alertWarning("当前状态不能修改！");
                        } else {
                            tool.editData(el);
                        }
                    }
                });
            } else {
                tool.alertWarning("请选择一条要操作的数据!");
            }
        },
         print: function (el) {
            var ids = tool.getChoseData($('.form-horizontal'));
            if (ids == '') {
                tool.alertWarning("请勾选要打印的数据!");
                return;
            }
            var url = 'https://www.scxszz.cn/Report/ReportServer' + "?reportlet=/sc_gx_lzjxj_sqb.cpt";
            tool.openReport(el,url+"&wid="+ids+"&zcd="+"true"+"&__filename__=国家励志奖学金申请表","国家励志奖学金申请表");
        },

        exportData: function (param, el) {
            var form_element = $(el).parents('.form-horizontal');
            var ids = tool.getChoseData(form_element);
            var elList = form_element.find('input[type="text"],input[type="hidden"],select');
            var temp = "";
            elList.each(function () {
                var $el = $(this);
                if (isNotBlank($el.val())) {
                    temp += $el.attr('name') + '=' + $el.val() + '&';
                }
            });
            if (elList.length > 0) {
                temp = temp.substr(0, temp.length - 1);
            }
            param = param + '?' + temp;
            var dwbm = '240002192';
            if (isNotBlank(dwbm)) {
                param += "&dwbm=" + dwbm;
            }
            if (ids == '' || ids == null) {
                tool.alertConfirm('确定要导出所有数据吗?', '', function () {
                    tool.exportData(param, 'https://www.scxszz.cn:443/pros_sczz/');
                })
            } else {
                param = param + "&wid=" + ids;
                tool.exportData(param, 'https://www.scxszz.cn:443/pros_sczz/');
            }
        }, cx: function () {
            $(".yc").toggle();
            $(".butyc").toggle();
            $(".butzk").toggle();
        },submitFormCallBack: function () {
            var nd = $("#sqnd").val();
            var nd1 = '2018';
            if (nd != nd1) {
                $("a[hide]").hide();
                $("button[hide]").hide();
            } else {
                $("a[hide]").show();
                $("button[hide]").show();
            }
        },sreach:function(el){
        tool.doSearch(el,null,pages.submitFormCallBack())
        	if($("#ndFlag").val()!=$("#sqnd").val()){
	        	$("[onClick*='pages.sp'],[onClick*='pages.del'],[onClick*='tool.importData'],[onClick*='tool.doR']").remove();
        	}else{
        		$("#czBtn").html(pages.text);
        	}
        }
    }
    $(function () {
        $(".yc").hide();
        $(".butyc").hide();
    });
    function isSubmitForm() {
        return true;
    }

    var Holiday = ["2018-10-01", "2018-10-02", "2018-10-03", "2018-10-04", "2018-10-05", "2018-10-06", "2018-10-07"];
    var WeekendsOff = ["2018-09-24"];
    function getMap(hd) {
        for (var i = 0; i < hd.length; i++) {
            holidayMap[hd[i]] = '1';
        }
    }
    function formatTen(f) {
        if (parseInt(f, 10) < 10) {
            return '0' + f;
        }
        return f;
    }
    function formateDate(date) {
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        return year + "-" + formatTen(month) + "-" + formatTen(day);
    }
    function getworkday(dat, itervalByDay) {
        var str = dat.split("-");
        var date = new Date();
        date.setUTCFullYear(str[0], str[1] - 1, str[2]);
        date.setUTCHours(0, 0, 0, 0);
        var millisceonds = date.getTime();
        for (var i = 1; i <= itervalByDay; i++) {
            millisceonds += 24 * 60 * 60 * 1000;
            date.setTime(millisceonds);
            if (date.getDay() == 0 || date.getDay() == 6) {
                i--;
            } else { //过滤节假日
                var d = formateDate(date);
                if (holidayMap[d]) {
                    i--;
                }
            }
        }
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var rq = year + "-" + formatTen(month) + "-" + formatTen(day);
        return rq;
    }
    getMap(holiday);
  function printAward(el,lx){
      var ids = tool.getChoseData($('.form-horizontal')); 
       if (ids == '' || ids == null) {
                tool.alertConfirm('确定要生成（打印）所有证书吗?', '', function () {
                   madeAward(el,lx,ids);
                });
    }else{
           madeAward(el,lx,ids);
      
    }
    }
    function madeAward(el,lx,ids){

        var sqnd=$("#sqnd").val();
        var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/make?lx='+lx+"&sqnd="+sqnd;
      var bburl = 'https://www.scxszz.cn/Report/ReportServer' ;
      var departtype='24';
      if(ids!=''&&ids!=null){
         url+='&wid='+ids;
      }
      
      $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	    beforeSend:function(){  
                 $.blockUI({message:'正在申请中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	    
			 if (data.oper_res) {
			        
			 			if(ids==""){
			 			bburl  += "?reportlet=/sczz_dzzs.cpt";
			if (departtype=='24') {
			 			 tool.openReport(el,bburl+"&fdybm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            } else if (departtype=='23') {
           // alert(2)
			 			 tool.openReport(el,bburl+"&yxbm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            } else if (departtype=='22') {
           // alert(3)
                     tool.openReport(el,bburl+"&xxbm="+'240002192'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
             else if (departtype=='01') {
           // alert(4)
                    tool.openReport(el,bburl+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
            else if (departtype=='100') {
                     tool.openReport(el,bburl+"&sfzhm="+'chengongsuo'+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
            	
            }
			 			}
			if(!ids==""){
			 	bburl  += "?reportlet=/sczz_dzzs.cpt";
			 	tool.openReport(el,bburl+"&wid="+data.data.wid+"&sqnd="+data.data.nd+"&__filename__=国家励志奖学金电子证书","电子证书系统");
			 			
			 			
			 			}
                   
                  
			 	} 
                  else {
                   tool.alertError('操作失败',data.oper_msg);
		   }
		},
    	})
    	tool.submitForm($(el).parents('.form-horizontal'));
     }
     function printZhang(el,type) {
	 var ids = tool.getChoseData($('.form-horizontal')); 
       if (ids == '' || ids == null) {
                tool.alertConfirm('确定要给所有证书盖章吗?', '', function () {
                   gaizhang(el,type,ids);
                });
    }else{
           gaizhang(el,type,ids);
      
    }
}
function gaizhang(el,type,ids) {
	 var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/gz?lx='+type+'&wid='+ids;
	  $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在盖章中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
		},
    	})
}
function printBm(el,type) {
    var ids = tool.getChoseData($('.form-horizontal')); 
    
  	var url = 'https://www.scxszz.cn:443/pros_sczz//s/biz/dyzs/bm?wid='+ids+'&type='+type;
  	if (ids == '' || ids == null) {
                tool.alertConfirm('确定要给所有数据生成编号吗?', '', function () {
                   $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在生成编号中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
			tool.submitForm($(el).parents('.form-horizontal'));
		},
    	})
                });
    }else{
          $.ajax({
    	  url : tool.initParams(url),
    	  type: "post",
    	  dataType : "json",
    	   beforeSend:function(){  
                 $.blockUI({message:'正在生成编号中，请稍候...'});  
          },  
           complete: function() {  
                 $.unblockUI();   
         } ,
    	  success: function (data) {
    	   if(data.oper_res=='success'){
    	     tool.alertSuccess('操作成功',data.oper_msg);
    	     }else{
    	     tool.alertError('操作时报',data.oper_msg);
    	     }
			tool.submitForm($(el).parents('.form-horizontal'));
		},
    	})
      
    }
	  
}   
</script>




                <input type="hidden" name="pager.currentPageno" value="1" id="yspager_currentPageno"/>
                <input type="hidden" name="pager.eachPageRows" value="20" id="eachPageRows"/>
                <div class="row mt-10" style="margin-top:1%">
                    







<div class="col-md-6 page-info">
    <div class="dataTables_info">当前显示 0 到 0 条，共 0 条记录</div>
</div>
<div class="col-md-6 page-info">
    <div class="dataTables_paginate paging_bootstrap">
        <ul class="pagination pagination-blue">
            
            <li class="disabled"><a><i class="fa fa-angle-double-left"></i></a></li>
            <li class="disabled"><a><i class="fa fa-angle-left"></i></a></li>
            
            
            <li class="active"><a data-current-page-no="1">1
            </a></li>
            
            

            
            <li class="disabled"><a><i class="fa fa-angle-right"></i></a></li>
            <li class="disabled"><a><i class="fa fa-angle-double-right"></i></a></li>
            
        </ul>
    </div>
</div>
                </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- end: PAGE CONTENT-->

    </div>
    




<!-- start: 必要脚本 -->


<!-- jquery-ui -->
<script src="/pros/resources/plugins/jquery-ui-1.11.4/jquery-ui.min.js"></script>

<!-- jquery-ui -->
<script src="/pros/resources/plugins/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>

<!-- blockUI -->
<script src="/pros/resources/plugins/blockUI/jquery.blockUI.js"></script>

<!-- radio,checkbox -->

<!-- 单选/多选 插件 -->
<script src="/pros/resources/plugins/iCheck/jquery.icheck.min.js"></script>
<!-- 下拉插件 -->

<!-- 下拉插件 -->
<script src="/pros/resources/plugins/select2-master/dist/js/select2.min.js"></script>
<!-- end: 必要脚本 -->
<!-- moment -->

<!-- 时间工具 -->
<script src="/pros/resources/plugins/moment/min/moment.min.js"></script>
<script src="/pros/resources/plugins/moment/locale/zh-cn.js"></script>
<!-- jquery.cookie -->

<!-- jquery.cookie -->
<script src="/pros/resources/plugins/jquery-cookie/jquery.cookie.js"></script>
<!-- 滚动条 -->

<!-- 滚动条 -->
<script src="/pros/resources/plugins/perfect-scrollbar/src/jquery.mousewheel.js"></script>
<script src="/pros/resources/plugins/perfect-scrollbar/src/perfect-scrollbar.js"></script>
<!-- 图片裁剪 -->

<!-- 图片剪裁 -->
<script src="/pros/resources/plugins/cropper-master/dist/cropper.js"></script>
<script src="/pros/resources/js/croppre.js"></script>
<!-- 文件上传 -->

<!-- 文件上传 -->
<!--[if lt IE 10]>
<script src="/pros/resources/plugins/uploadify/jquery.uploadify.min.js"></script>
<![endif]-->
<!--[if gte IE 10]><!-->
<script src="/pros/resources/plugins/uploadifive/jquery.uploadifive.min.js"></script>
<script src="/pros/resources/js/content-type.js"></script>
<!--<![endif]-->
<!-- 表单验证 -->

<!-- 表单验证 -->
<script src="/pros/resources/plugins/jQuery-Validation-Engine-master/js/jquery.validationEngine.js"></script>
<script src="/pros/resources/plugins/jQuery-Validation-Engine-master/js/languages/jquery.validationEngine-zh_CN.js"></script>
<!-- 日期插件 -->

<!-- 日期插件 -->
<script src="/pros/resources/plugins/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<!-- ztree -->

<!-- ztree -->
<script type="text/javascript" src="/pros/resources/plugins/zTree_v3/js/jquery.ztree.all-3.5.min.js"></script>
<!-- 提示框 -->

<!-- 提示框 -->
<script src="/pros/resources/plugins/bootbox/bootbox.min.js"></script>
<!-- 弹出框 -->

<!-- 弹出框 -->
<script src="/pros/resources/plugins/sweetalert-0.5.x/lib/sweet-alert.js"></script>
<!-- 自动大小 -->

<script src="/pros/resources/plugins/autosize/jquery.autosize.min.js"></script>
<!-- 文字截取 -->

<!-- 文字截取 -->
<script src="/pros/resources/plugins/truncate/jquery.truncate.js"></script>
<!-- 富文本编辑器 -->

<!-- 富文本编辑器 -->
<script src="/pros/resources/plugins/ueditor/ueditor.config.js"></script>
<script src="/pros/resources/plugins/ueditor/ueditor.all.min.js"></script>
<!-- 向导式表单 -->

<!-- 向导式表单 -->
<script src="/pros/resources/plugins/jQuery-Smart-Wizard/js/jquery.smartWizard.js"></script>
<!-- 图片预览 -->

<!-- 图片预览  -->
<link rel="stylesheet" href="/pros/resources/plugins/viewer-master/dist/viewer.css">
<!-- 框架 -->


<!-- start: CORE JAVASCRIPTS -->
<script src="/pros/resources/js/syscode_init.js"></script>
<script src="/pros/resources/js/syscode.js"></script>
<script src="/pros/resources/js/main.js"></script>
<script src="/pros/resources/js/frame-tool-tab-model.js"></script>
<!-- end: CORE JAVASCRIPTS -->
<script>
    tool.userloginid = 'chengongsuo';
    tool.usertype = '1, 2, 3, 4, 5';
    tool.group = '15122910383306910022,';
    $(document).ready(function () {
        $('.form-horizontal').each(function () {
            var $form = $(this);
            if (isBlank($form.attr('data-action'))) {
                $form.attr('data-action', window.location.href);
                if (window.location.href.indexOf("action") < 0) {//spring mvc
                    $form.find("#yspager_currentPageno").attr("name", "currentPageno");
                    $form.find("#eachPageRows").attr("name", "eachPageRows");
                }
            }
        });
        $('.tabModel-content').removeClass('hide').addClass("fadeInUp").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
            $(this).removeClass("fadeInUp");
        });
        Main.initTabModel();
    });
</script>
<!-- 图标 -->

<!-- 图表 -->
<script src="/pros/resources/plugins/Highcharts-4.2.6/js/highcharts.js"></script>

</body>

</html>


